﻿package Game.LogicSystem.Actions {
	import Game.LogicSystem.ActionManager;
	
	public class BaseActionCollection {
		
		// Constants:
		// Public Properties:
		// Private Properties:
		private var m_ActionManager:ActionManager;
		
	
		// Initialization:
		public function BaseActionCollection(_ActionManager:ActionManager) { 
			m_ActionManager=_ActionManager;
		}
	
		// Public Methods:
		public function makeActionListFor(_object:*):Array{
			var Obj:* = _object;
			var objType:int = Obj.getObjectType();
			var actionArray:Array = new Array();
			var finalArray:Array = new Array();
			if(m_ActionManager.isCurrentPlayer()){
				
				switch (objType){
					case 0:
					//c'est un QG
					actionArray.push(new Array("Creer Unitée",m_ActionManager.BatActions.CreateUnit,new Array(_object)));
					actionArray.push(new Array("Attendre",waitAction));		
					finalArray.push("openObjectPanel",actionArray);		   
					break;
				}
				
				return finalArray;
			}
			return new Array();
		}
		public function waitAction():void{
			
		}
	}
	
}